//对象赋值
let name='JSPang';
let skill='web';

let obj={name,skill};
let obj1={name:name,skill:skill};

console.log(obj);
console.log(obj1);

//Key值构建
let key='skill';
let obj2={
    [key] : 'value'
}

console.log(obj2);

//自定义对象方法
let obj3={
    add : function(a,b){
        return a+b
    }
}

console.log(obj3.add(3,4));

//is()
let obj4={name : 'JSPang'};
let obj5={name : 'JSPang'};

console.log(obj4.name === obj5.name);
console.log(Object.is(obj4.name,obj5.name));

console.log("下面是比较栗子!===是同值相等,is()是严格相等!!");
console.log(+0 === -0);
console.log(NaN === NaN);

console.log(Object.is(+0,-0));
console.log(Object.is(NaN,NaN));

//assign
console.log("下面是assign");
let d={d:'JSPang'};
let e={e:'技术胖'};
let f={f:'老民'};

let g = Object.assign(d,e,f);
console.log(g);